package com.aaa.controller.scl;

import com.aaa.entity.LayData;
import com.aaa.entity.scl.SclRecordDedtail;
import com.aaa.service.scl.SclRecordDedtailService;
import org.springframework.web.bind.annotation.*;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * (SclRecordDedtail)表控制层
 *
 * @author makejava
 * @since 2022-10-27 19:11:05
 */
@RestController
@RequestMapping("sclRecordDedtail")
public class SclRecordDedtailController {
    /**
     * 服务对象
     */
    @Autowired
    private SclRecordDedtailService sclRecordDedtailService;

    @PostMapping
    // @RequestBody 把json字符串转化为对象   参数前面
    public LayData insertDetail(@RequestBody List<SclRecordDedtail> details){
        return new LayData(sclRecordDedtailService.insertBatch(details));
    }
}

